﻿<!DOCTYPE html>
<html lang="en" class="en">
<head>
    <title>首页 - 侃侃而谈 </title>
    <script type="text/javascript">var P_TIMER_START = new Date();</script>
    <meta name="google-site-verification" content="test" />
    <meta name="application-name" content="侃侃而谈" />
    <meta name="msapplication-TileColor" content="#ffffff" />
    <meta name="msapplication-TileImage" content="/images/logo_trans_144x144.png" />
    <meta property="fb:app_id" content="test" />
    <meta property="og:site_name" content="侃侃而谈" />
    <meta property="og:url" content="http://test.com" />
    <meta property="og:title" content="侃侃而谈" />
    <meta property="og:description" content="侃侃而谈是一个聊天的社区" />
    <meta property="og:image" content="/images/about/logos/Logo.png" />
    <meta property="og:type" content="website" />
    <link rel="icon" href="/images/favicon.png" type="image/x-icon" />
    <link rel="apple-touch-icon-precomposed" href="/images/ipad_touch_icon.png" />
    <!--<link href="/Styles/pinboard_471dc126.css" rel="stylesheet" />-->
    <link href="/Styles/psimple.css" rel="stylesheet" />
    <link href="/Styles/common.css" rel="stylesheet" />
    <link href="/Styles/waterfall-item.css" rel="stylesheet" />
    <link href="/Styles/themes/gray/easyui.css" rel="stylesheet" />
    <link href="/Styles/MessageBoxMin/dialog.css" rel="stylesheet" />
    <script src="/Scripts/jquery-1.8.3.js"></script>
    <script src="/Scripts/jquery.imagesloaded.js"></script>
    <script src="/Scripts/jquery.wookmark.js"></script>
    <script src="/Scripts/easyui/jquery.parser.js"></script>
    <script src="/Scripts/easyui/jquery.draggable.js"></script>
    <script src="/Scripts/easyui/jquery.resizable.js"></script>
    <script src="/Scripts/easyui/jquery.panel.js"></script>
    <script src="/Scripts/easyui/jquery.window.js"></script>
    <script src="/Scripts/jquery.form.js"></script>
    <script src="/Scripts/main.js"></script>
    <script src="/Scripts/MessageBoxMin.js"></script>
    <script src="/Scripts/ueditor/ueditor.config.js"></script>
    <script src="/Scripts/ueditor/ueditor.all.min.js"></script>

</head>
<body id="CategoriesBarPage">
    <div class="PublishForm">
        <form class="standardForm" method="post">
        <input type="hidden" name="cmd" value="add" />
        <ul>
            <li class="boardWrapper">
                <h3>
                    <label>标签</label>
                </h3>
                <div>
                    <div class="medium BoardPicker Module">
                        <div class="createBoard">
                            <input type="text" autofocus="" placeholder="请使用逗号隔开" class="createBoardName" id="tags" name="tags">
                        </div>
                    </div>
                </div>
            </li>
            <li>
                <h3>
                    <label for="linkUrl">相关网址</label>
                </h3>
                <div>
                    <div class="ui-TextField Module">
                        <textarea placeholder="可以使用逗号或换行分割" class="TopicUrl" name="linkUrl" id="linkUrl"></textarea>
                    </div>
                </div>
            </li>
            <li>
                <h3>
                    <label for="content">内容</label>
                </h3>
                <div>
                    <div class="ui-TextField Module">
                        <textarea placeholder="" class="TopicContent" name="content" id="content"></textarea>
                    </div>
                </div>
            </li>

        </ul>
        <div class="formFooter">
            <div class="socialShareWrapper">
            </div>
            <div class="formFooterButtons">
                <button class="rounded Button repinSmall primary Module btn" disabled="disabled" type="submit">
                    <span class="buttonText">发布</span></button>
                <button class="rounded Button hasText Module btn cancelButton" type="button">
                    <span class="buttonText">取消</span>
                </button>
            </div>
        </div>
        </form>
    </div>

    <div id="Header">
        <div class="LiquidContainer HeaderContainer">
            <a href="/index.html" id="Pinterest"></a>
            <ul id="Navigation">
                <li class="submenu">
                    <a href="#" class="nav">&nbsp;&nbsp;分类&nbsp;&nbsp;<span></span></a>&nbsp;&middot;
                        <ul id="CategoriesDropdown">
                            <li>
                                <span class="SubmenuColumn">
                                    <a href="#">江湖传闻</a>
                                    <a href="#">八卦</a>
                                    <a href="#">名人</a>
                                    <a href="#">生活</a>
                                    <a href="#">情感</a>
                                </span>
                                <span class="SubmenuColumn">
                                    <a href="#">政治</a>
                                    <a href="#">军事</a>
                                    <a href="#">国际</a>
                                    <a href="#">科技</a>
                                </span>
                            </li>
                        </ul>
                </li>
                <li>
                    <a href="#"
                        class="nav">随机
                    </a>&nbsp;&middot;
                </li>
                <li>
                    <a href="#" class="nav">热议
                    </a>&nbsp;&middot;
                </li>
                <li>
                    <div id="Search">
                        <form action="#" method="get" class="text">
                        <input type="text" id="query" name="q" size="27" value="" placeholder="搜索">
                        <a id="query_button" href="#" class="lg">
                            <img src="/images/search.gif" alt="" /></a>
                        </form>
                    </div>
                </li>
                <li><span id="publishNew" class="nav">发言<span class="PlusIcon"></span></span></li>

                <li id="UserNav">
                    <a href="#" class="nav">
                        <img src="/images/user/default_60.png" alt="img" />lardust<span></span></a>
                    <ul>
                        <li><a href="#">我的评论</a></li>
                        <li><a href="#">提及</a></li>
                        <li><a href="#">支持</a></li>
                        <li><a href="#">反对</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="nav">关于&nbsp;<span></span></a>
                    <ul>
                        <li><a href="#">帮助</a></li>
                        <li class="beforeDivider"><a href="#" target="_blank">合作</a></li>
                    </ul>
                </li>
            </ul>
        </div>

    </div>

    <div id="Main">
        <!--<div id="container"></div>-->
        <div id="container">
            <div class="WB_feed">
                <div class="WB_feed_datail S_line2 clearfix">
                    <dl>
                        <dt class="Topic_Face"><a title="$NickName" href="#" class="W_face_radius">
                            <img width="50" height="50" src="$HeadPic" alt="" title="$NickName" />
                        </a></dt>
                        <dd class="Topic_Detail">
                            <div class="WB_info">
                                <a href="#" class="WB_name S_func1">$NickName</a>
                                <!--特殊标记部分<a href="#" target="_blank">
                                    <i class="W_ico16 approve" title="新浪个人认证 "></i>
                                </a>-->
                            </div>
                            <div class="WB_text">
                                $Content
                            </div>
                            <div class="WB_func clearfix">
                                <div class="WB_handle">
                                    <!--c.BadCount,c.HitCount,c.MiddleCount,c.NiceCount,c.RemarkCount-->
                                    <span>支持 ($NiceCount)</span><i class="S_txt3">|</i>
                                    <span>反对 ($BadCount)</span><i class="S_txt3">|</i>
                                    <span>关注 ($FollowCount)</span><i class="S_txt3">|</i>
                                    <span>回复 ($RemarkCount)</span>
                                </div>
                                <div class="WB_from">
                                    <span class="S_link2 WB_time" title="$CreateDate">$CreateDate-now()</span>
                                </div>
                            </div>
                        </dd>
                    </dl>

                    <div style="" class="WB_media_expand repeat S_line1 S_bg4">
                        <div class="WB_media_expand repeat S_line1 S_bg1 CommentPublish" style="">
                            <div class="WB_arrow">
                                <em class="S_line1_c">◆</em>
                                <span class=" S_bg1_c">◆</span>
                            </div>

                            <!-- 评论框  -->
                            <div class="S_line1 input">
                                <div>
                                    <textarea name="" rows="" cols="" class="W_input" style=""></textarea>
                                </div>
                                <p class="btn"><span class="W_btn_d btn_noloading"><span><b></b><em>评论</em></span></span></p>
                            </div>
                        </div>
                        <!-- 已有评论列表 按时不实现 -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function ()
        {
            

            initWookMark();
            $("#publishNew").click(publishNew);

            initPublishNewBox();

            $(window).resize(function ()
            {
                $('.PublishForm').window('center');
            });
        });
        function initPublishNewBox()
        {
            var boxHeight = $.browser.msie ? 480 : 445;
            $('.PublishForm').window(
                {
                    title: "添加新话题",
                    width: 600,
                    height: boxHeight,
                    collapsible: false,
                    minimizable: false,
                    draggable: false,
                    closed: true,
                    modal: true,
                    inline: false
                });
        }
        function initData()
        {
            var jobj = $(this);
            var id = jobj.attr("sid");
            $.ajax({
                type: "Get",
                dataType: "text",
                url: "List.aspx",
                data:
                {
                    method: "GetDetail",
                    id: id,
                    rnd: Math.random()
                },
                success: function (data)
                {
                    if (data)
                    {
                        var objjson = jQuery.parseJSON(data);
                        checkLogin(objjson, document);
                        var cobj = objjson[0];
                        $("#detailTitle").text(cobj.Title);
                        $("#detailTypeName").text(cobj.TypeName);
                        $("#detailPriorityName").text(cobj.PriorityName);
                        $("#detailSendTime").text(cobj.SendTime);
                        $("#detailSender").text(cobj.Sender);
                        var re = new RegExp("<(?!a|br|p|img)[^<]*>");
                        $("#detailContent").html(cobj.Content.replace(re, ""));
                        $('#dgdetails').dialog('open').dialog('setTitle', '消息详情');
                        lastSelectrowData.Readed = true;
                        $('#dg').datagrid('updateRow',
                        {
                            index: lastSelectRowIndex,
                            row: lastSelectrowData
                        });
                        $(".details").each(function () { $(this).click(details); });//也许不是最佳方法，因为更新了所有的绑定，但时间很紧，你懂的。
                    }
                    else
                    {
                        $.messager.alert("提示", "加载数据失败", 'error');
                    }
                }
            });
        }
        function publishNew()
        {
            $('.PublishForm').window('open');
        }
        function initWookMark()
        {
            $('#container').imagesLoaded(function ()
            {
                // Prepare layout options.
                var options = {
                    autoResize: true, // This will auto-update the layout when the browser window is resized.
                    container: $('#Main'), // Optional, used for some extra CSS styling
                    offsetX: 13, // Optional, the distance between grid items
                    offsetY: 10, // Optional, the distance between grid items
                    itemWidth: 473 //236 Optional, the width of a grid item
                };
                function onScroll(event)
                {
                    // Check if we're within 100 pixels of the bottom edge of the broser window.
                    var winHeight = window.innerHeight ? window.innerHeight : $(window).height(); // iphone fix
                    var closeToBottom = ($(window).scrollTop() + winHeight > $(document).height() - 100);

                    if (closeToBottom)
                    {
                        // Get the first then items from the grid, clone them, and add them to the bottom of the grid.
                        var items = $('#container .WB_feed'),
                            firstTen = items.slice(0, 10);
                        $('#container').append(firstTen.clone());

                        // Destroy the old handler
                        if (handler.wookmarkInstance)
                        {
                            handler.wookmarkInstance.clear();
                        }

                        // Create a new layout handler.
                        handler = $('#container .WB_feed');
                        handler.wookmark(options);
                    }
                };
                // Capture scroll event.
                //$(window).bind('scroll', onScroll);

                // Get a reference to your grid items.
                var handler = $('#container .WB_feed');
                // Call the layout function.
                handler.wookmark(options);

                // Capture clicks on grid items.
                //handler.click(function ()
                //{
                //    // Randomize the height of the clicked item.
                //    var newHeight = $('img', this).height() + Math.round(Math.random() * 300 + 30);
                //    $(this).css('height', newHeight + 'px');
                //    // Update the layout.
                //    handler.wookmark();
                //});
            });
        }
    </script>
</body>
</html>
